package com.dididoctor.doctor.Utils;

import android.app.Activity;
import android.content.Intent;

import com.dididoctor.doctor.R;

/**
 * 项目名称：课海
 * 类描述：activity跳转动画
 * 创建人：张强
 * 创建时间：2015/7/10 10:31
 * 修改人：
 * 修改时间：2015/7/10 10:31
 * 修改备注：
 */
public class ActivityAnimationUtils {

    public static void finish(Activity activity) {
        activity.finish();
        activity.overridePendingTransition(R.anim.scale_finish_out,
                R.anim.scale_finish_in);
    }

    public static void startnewActivity(Activity activity) {
        activity.overridePendingTransition(R.anim.scale_from_in,
                R.anim.scale_from_out);
    }

    public static void startNewActivity(Activity activity, Intent intent) {
        activity.overridePendingTransition(R.anim.scale_from_in,
                R.anim.scale_from_out);
        activity.startActivity(intent);
    }
}
